package com.vcredit.creditcat.enumtype;

public enum LrhAuthMarriageEnum {
  UNMARRIED(1, "未婚","NEWMARRIAGE/WH"), MARRIED(2, "已婚","NEWMARRIAGE/YH")
  , DIVORCE(3, "离异","NEWMARRIAGE/WSMHYZK"), WIDOWED(4, "丧偶","NEWMARRIAGE/WSMHYZK");

  private Integer code;
  private String desc;
  private String lrhCode;

  private LrhAuthMarriageEnum(Integer code, String desc, String lrhCode) {
    this.code = code;
    this.desc = desc;
    this.lrhCode = lrhCode;
  }

  public Integer getCode() {
    return code;
  }

  public String getDesc() {
    return desc;
  }
  
  public  static String getLrhCodeByDesc(Integer code) {
		for (LrhAuthMarriageEnum c : LrhAuthMarriageEnum.values()) {
			if (c.getCode().equals(code)) {
				return c.lrhCode;
			}
		}
		return null;
  }

}
